package com.chat.module.user.domain;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.comment.config.dao.typeHandler.SetLongHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Set;


@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(autoResultMap = true)
public class User
        extends Model<User> {
    @TableId(type = IdType.INPUT)
    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("最近联系人")
    @TableField(typeHandler = SetLongHandler.class)
    public Set<Long> recentContacts;

    @ApiModelProperty("黑名单")
    @TableField(typeHandler = SetLongHandler.class)
    public Set<Long> blackList;

    @ApiModelProperty("在线好友列表 动态返回")
    @TableField(exist = false)
    public Set<Long> onlineFriends;


    @ApiModelProperty("好友id 列表")
    @TableField(typeHandler = SetLongHandler.class)
    public Set<Long> friendIds;

    @ApiModelProperty("待好友通过列表")
    @TableField(typeHandler = SetLongHandler.class)
    public Set<Long> skipList;
}

